cmake_minimum_required(VERSION 2.8)
include (CheckSymbolExists)
include (CheckCXXSymbolExists)
include (CheckIncludeFiles)
include (CheckIncludeFileCXX)
include (CheckCXXSourceCompiles)

option (DEBUG_MODE "Enable OOFEG" ON)

project(Ex11)

#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fpermissive")
set (CMAKE_CXX_FLAGS "-fpermissive -g")



# add to the include search path
include_directories(.)
#include_directories("${PROJECT_SOURCE_DIR}/../..")
include_directories(d:/Luciano/Numerico/MecSol/EPSol/Src)

set (EPSOL_INCLUDE_DIR d:/Luciano/Numerico/MecSol/EPSol/Src)
set (EPSOL_LIB_DIR d:/Luciano/Numerico/MecSol/EPSol/Bin_CodeBlocks/EPSol)

set (MY_METIS_DIR D:/Luciano/Numerico/Libs/metis-5.1.0)
set (METIS_LIBRARY_DIRS ${MY_METIS_DIR}/bin-x86_64-mingw)

include_directories ("${MY_METIS_DIR}/include")
include_directories ("${MY_METIS_DIR}/include")
link_directories (${METIS_LIBRARY_DIRS})
set (EXT_LIBS ${EXT_LIBS} metis)

set (MY_PETSC_DIR "D:/Luciano/Numerico/Libs/petsc-3.4.4")

if(DEBUG_MODE)
set (MY_PETSC_ARCH arch-mswin-c-debug-shared-mpi0-fc0)
else ()
set (MY_PETSC_ARCH arch-mswin-c-release-mpi0-fc0)
endif ()
find_package (PETSc REQUIRED HINTS "${MY_PETSC_DIR}/${MY_PETSC_ARCH}/conf")
include_directories ("${MY_PETSC_DIR}/include" "${MY_PETSC_DIR}/${MY_PETSC_ARCH}/include" ${PETSC_INCLUDE_PATH})
include_directories ("${MY_PETSC_DIR}/include/mpiuni")
	

#set (LASPACK_INCLUDE /cygdrive/c/EPSol\ Libs/Laspack/src/)
#set (LASPACK_LIBRARY_DIR /cygdrive/c/EPSol\ Libs/Laspack/bin/Win64)

include_directories("${EPSOL_INCLUDE_DIR}")
include_directories("${EPSOL_INCLUDE_DIR}/Boundary")
include_directories("${EPSOL_INCLUDE_DIR}/Field")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement/DoFHandler")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement/FEField")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement/Integration")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement/Mesh")
include_directories("${EPSOL_INCLUDE_DIR}/FiniteElement/ShapeFunction")
include_directories("${EPSOL_INCLUDE_DIR}/Function")
include_directories("${EPSOL_INCLUDE_DIR}/Input")
include_directories("${EPSOL_INCLUDE_DIR}/Material")
include_directories("${EPSOL_INCLUDE_DIR}/Matrix")
include_directories("${EPSOL_INCLUDE_DIR}/Mesh")
include_directories("${EPSOL_INCLUDE_DIR}/Model")
include_directories("${EPSOL_INCLUDE_DIR}/Output")
include_directories("${EPSOL_INCLUDE_DIR}/SistEcuac")
include_directories("${EPSOL_INCLUDE_DIR}/Solver")
include_directories("${EPSOL_INCLUDE_DIR}/Type")
include_directories("${EPSOL_INCLUDE_DIR}/Utils")

#include_directories(/cygdrive/c/EPSol\ Libs/Laspack/src/)
#include_directories(${LASPACK_INCLUDE})
#link_directories(${LASPACK_LIBRARY_DIR})
link_directories (${EPSOL_LIB_DIR})



set (EPSOL_LIB epsollib)

#add the executable
set (SOURCES
Ex11.cpp
)
add_executable(Ex11 ${SOURCES})

target_link_libraries (Ex11 ${EPSOL_LIB} ${EXT_LIBS})
